﻿using DSFramework;

using Newtonsoft.Json;

using System;
using System.Collections.Generic;
using System.IO;
using System.Text;

namespace DSFramework
{
    public class ConfigHelper
    {
        public static MailConfig ReadEmailConfigJson()
        {
            string path = AppDomain.CurrentDomain.BaseDirectory +"EmailConfig.json";

            string json = File.ReadAllText(path);
            var obj = JsonConvert.DeserializeObject<MailConfig>(json);
            return obj;
        }

        public static string ReadText()
        {
            string path = AppDomain.CurrentDomain.BaseDirectory + "dbConfig.txt";
            string str = File.ReadAllText(path);
            return str;
        }

    }
}
